package com.reader.cms.service.impl.sys;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.reader.cms.entity.sys.SysErrorLog;
import com.reader.cms.mapper.sys.SysErrorLogMapper;
import com.reader.cms.service.sys.ISysErrorLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jiahaikun
 * @date 2018-07-24
 */
@Service
@Transactional
public class SysErrorLogServiceImpl extends ServiceImpl<SysErrorLogMapper, SysErrorLog> implements ISysErrorLogService {


@Autowired
private SysErrorLogMapper sysErrorLogMapper;



/**
 *  多表关联查询
 * @param currentPage 当前页
 * @param size 每页显示多少条
 * @param code
 *@param message @return
 */
    @Transactional(readOnly=true)
    @Override
    public Page<Map<String, Object>> selectListPage(int currentPage, int size, String code, String message, String url) {
            Page<Map<String, Object>> page = new Page<>(currentPage, size);// 当前页，总条数 构造 page 对象
            return page.setRecords(sysErrorLogMapper.selectListPage(page,code,message, url));
    }

}